import { lazy } from "react";

const routes=[
    {
        path:'/home',
        component:lazy(()=>import('../views/Home')),
        children:[
            {
                path:'/home/homePage',
                component:lazy(()=>import('../views/home/HomePage')),
            },
            {
                path:'/home/classify',
                component:lazy(()=>import('../views/home/Classify')),
            },
            {
                path:'/home/jingxi',
                component:lazy(()=>import('../views/home/Jingxi')),
            },
            {
                path:'/home/shop',
                component:lazy(()=>import('../views/home/Shop')),
            },
            {
                path:'/home/my',
                component:lazy(()=>import('../views/home/My')),
            },
        ]
    },
    {
        path:'/login',
        component:lazy(()=>import('../views/Login'))
    },
    {
        path:'/detail',
        component:lazy(()=>import('../views/Detail'))
    },
    {
        path:'/',
        redirect:'/home/homePage'
    }
]

export default routes